//
//  NSDate+Extend.h
//  RMMaterialRed
//
//  Created by XBWH on 2024/3/8.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface NSDate (Extend)
@property(assign,readonly,nonatomic)NSInteger year;
@property(assign,readonly,nonatomic)NSInteger month;
@property(assign,readonly,nonatomic)NSInteger day;
@property(assign,readonly,nonatomic)NSInteger hour;
@property(assign,readonly,nonatomic)NSInteger minute;
@property(assign,readonly,nonatomic)NSInteger seconds;
@property(assign,readonly,nonatomic)NSInteger weekday;

+(NSDate *)rb_dateWithDateString:(NSString *)dateString;
+(NSDate *)rb_dateWithFormat_yyyy_MM_dd_HH_mm_ss_string:(NSString *)string;
+(NSDate *)rb_dateWithFormat_yyyy_MM_dd_HH_mm_string:(NSString *)string;
+(NSDate *)rb_dateWithFormat_yyyy_MM_dd_HH_string:(NSString *)string;
+(NSDate *)rb_dateWithFormat_yyyy_MM_dd_string:(NSString *)string;
+(NSDate *)rb_dateWithFormat_yyyy_MM_string:(NSString *)string;

///按指定格式获取当前的时间
+(NSString *)rb_currentDateStringWithFormat:(NSString *)formatterStr;
+(NSString *)rb_dayFromFormatWeekday:(NSDate *)date;

-(NSString *)rb_stringWithFormat:(NSString *)format;
@end

NS_ASSUME_NONNULL_END
